import time
# from functools import wraps


def timeit(func):
    # @wraps(func)
    def wrapper(arg):
        print(arg)
        start = time.clock()
        func(arg)
        end = time.clock()
        print 'used:', end - start

    return wrapper


@timeit
def foo(arg):
    print 'in foo()'


def foo2(arg):
    print 'in foo2()'


print(foo('bbb'))

print('-' * 20)

print(timeit(foo2)('aaa'))
